package exceptions;

/**
 * 
 * @author Tim
 * @version 0.4.0
 * @since 0.4.0
 */
public class IllegalPlayerCountException extends Exception {

	private static final long serialVersionUID = 6978532101828261058L;
	private final int playercount;
	
	/**
	 * Constructor which accepts a message and the illegal Playercount
	 * 
	 * @param message MessageString
	 * @param playercount Failed Playercount
	 */
	public IllegalPlayerCountException(String message, int playercount) {
		super(message);
		this.playercount = playercount;
	}

	/**
	 * 
	 * @return Returns the MessageString
	 */
	@Override
	public String getMessage() {
		return super.getMessage() + " (" + playercount +")";
	}
	
}
